<? if(!defined('IN_MDL')) exit('Access Denied');?>
<? include $this->gettpl('header');?> 

<link href="<?=APPPUBLIC?>Styles/Page.css" rel="stylesheet" type="text/css" />
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#e6e6e6"><table width="920" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="200" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="40"><img src="<?=APPPUBLIC?>Images/Categories/Women.gif"   /></td>
            </tr>
          <tr>
            <td height="40"><a href="<? geturl('index')?>" class="Categories_Menu_a"><img src="<?=APPPUBLIC?>Images/Public/CZ.png" width="80" height="25" border="0" /></a></td>
          </tr>
          <tr>
            <td height="40"><img src="<?=APPPUBLIC?>Images/Categories/Categories.gif"  /></td>
            </tr>
         <? foreach((array)$cat_list as $key => $val) {?>
            <tr>
            <td><?=$val['level_space']?><? if($val['level']>0) { ?><img src="<?=APPPUBLIC?>Images/joinbottom.gif"><? } ?><a href="<? goods_url(array('cat'=>$val['cat_id']))?>" class="Categories_Menu_a" title=<?=$val['url']?>><?=$val['cat_name']?></a></td>
            </tr>
			<?}?>	
          <tr>
            <td height="20"></td>
            </tr>

          <tr>
            <td height="25" valign="top"><img src="<?=APPPUBLIC?>Images/Categories/Sizes.gif"  /></td>
            </tr>
		<? if($size) { ?>
			<tr>
            <td width=200><div class="msize_s"><? echo $size_list[$size]?></div>&nbsp;<a href="<? goods_url(array('size'=>'-1'))?>"><img src=<?=APPPUBLIC?>Images/Public/Remove_1.gif border=0></a></td>
            </tr>
			  
		  <? } else { ?>
		  <tr><td>
		  <? foreach((array)$size_list as $key => $val) {?>
		  
           <a href="<? goods_url(array('size'=>$key))?>" class="msize"><?=$val?></a>
			
			<?}?></td>
			</tr>
		  <? } ?>          
          <tr>
            <td height="20"></td>
            </tr>
          <tr>
            <td height="25" valign="top"><img src="<?=APPPUBLIC?>Images/Categories/Colors.gif"  /></td>
          </tr>  
		<? if($color) { ?>
			<tr>
            <td><img src="<?=WEB_PUBLIC_URL?>speclogo/<? echo $color_list[$color]?>" border=0>&nbsp;<a href="<? goods_url(array('color'=>'-1'))?>"><img src=<?=APPPUBLIC?>Images/Public/Remove_1.gif border=0></a></td>
            </tr>
			  
		  <? } else { ?> <tr> 
		  <td >
		  <? foreach((array)$color_list as $key => $val) {?>
           <div class="mccolor"><a href="<? goods_url(array('color'=>$key))?>" class="Categories_Menu_a"><img src=	<?=WEB_PUBLIC_URL?>speclogo/<?=$val?> border=0 ></a>
            </div>
			<?}?>
			</td>
			</tr>
		  <? } ?>			
            
          <tr>
            <td height="20"></td>
            </tr>
<tr>
            <td height="26" valign="top"><img src="<?=APPPUBLIC?>Images/Categories/Brands.gif"   /></td>
            </tr>
		  <? if($brand) { ?>

			<tr>
            <td><? echo $brand_list[$brand]['brand_name']?>&nbsp;<a  href="<? goods_url(array('brand'=>'-1'))?>" ><img src=<?=APPPUBLIC?>Images/Public/Remove.gif border=0></a></td>
            </tr>
			<tr>
            <td><a href="<? goods_url(array('brand'=>'-1'))?>" class="Categories_Menu_a"><strong><font color="#444444">更多品牌...</font></strong></a></td>
            </tr>  

		  <? } else { ?>
		  <? foreach((array)$brand_list as $key => $val) {?>
            <tr>
			            <td><a href="<? goods_url(array('brand'=>$val['brand_id'] ) )?>" class="Categories_Menu_a" title="<?=$val['brand_name_zn']?>"><?=$val['brand_name']?></a></td>

             
            </tr>
			<?}?>	
		  <? } ?>
          
           <tr>
            <td height="20"></td>
            </tr>
          <tr>
            <td height="25" valign="top"><img src="<?=APPPUBLIC?>Images/Categories/Price.gif"  /></td>
            </tr>
			<tr>
            <td>
			<? if($price) { ?>
				<tr>
				<td><img src=	"<?=APPPUBLIC?>Images/Categories/P_<? echo ($price)?>.gif" border=0>&nbsp;<a href="<? goods_url(array('price'=>'-1'))?>"><img src=<?=APPPUBLIC?>Images/Public/Remove.gif border=0></a></td>
				</tr> 
			  
		   <? } else { ?>
			  <tr> <td>
			  <? foreach((array)$price_list as $key => $val) {?>
			 
				<div class="mcprice"><a href="<? goods_url(array('price'=>$key))?>" class="Categories_Menu_a"><img src=	"<?=APPPUBLIC?>Images/Categories/P_<? echo ($key)?>.gif" border=0></a>
				</div>
			 
			 
			<?}?>
			</td>
			</tr>

		 <? } ?>         
            <tr>
            <td height="20"></td>
            </tr>           
          <tr>
            <td height="20"></td>
            </tr>
          <tr>
            <td></td>
            </tr>
        </table></td>
        <td width="720" valign="top" bgcolor="#FFFFFF"><table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="1" colspan="2" bgcolor="#e6e6e6"></td>
            </tr>
            <tr>
              <td height="40" colspan="2" class="Title"><?=$cat_name?></td></tr>
          <tr>
            <td width="100%" height="40" colspan="2" bgcolor="#f6f6f6"><table border="0" cellspacing="0" cellpadding="0">
            <tr><td><?=$nav_url?></td></tr>
              </table></td>
            </tr>
           <? if($goods_list) { ?>
          <tr>
            <td width="50%" height="30" class="line_L_1">排序：<?=$set_orderby?></td>
            <td width="50%" height="30" align="right" class="line_L_1"><a href="<? goods_url(array('psize'=>'0'))?>" class="Categories_Menu_a">显示全部</a> | 每页显示：<?=$set_psize?></td>
            </tr>
        </table>
          <table width="700" align="center" cellpadding="0" cellspacing="0">
          <tr><td align="center">
          
           <? foreach((array)$goods_list as $key => $val) {?>
           <? include $this->gettpl('goods_show');?>
            
			<?}?>	
          
          </td></tr>
          </table>

		  <?=$multipage?> 
          <? } else { ?>  
   		<? include $this->gettpl('nogoods');?>
  	<? } ?>
          </td>
        </tr>
       
    </table></td>
  </tr>
</table>
<script type="text/javascript">
//<![CDATA[
/*************************
*简单的图片加载类
*功能：避免了在img 里直接判断宽高造成屏幕的闪烁
*函数：loadImage，用来加载图片，可以在head中直接使用，也可以在你所需要的位置使用。
*参数：
*url:图片url
*alt:图片alt
*maxWidth:最大宽度，可不设置
*maxHeight:最大高度，可不设置
*id:图片img的id,如果查找不到这个id，直接在所在位置插入一个img
*作者：子乌,sheneyan
*************************/
ImageLoader=function(){
  //自定义的系统参数，保存指定的Image对象
  if (!window.imageLoaders)
    window.imageLoaders={};
  //将所有列表中的图片默认隐藏,在系统加载完毕后立即执行，不过opera的加载机制似乎与ie和ff不同，它会等所有图片都加载完才执行onload，所以这些代码实际作用不大...
  window.hideImage=function(){
    for (a in window.imageLoaders){
        // alert(window.imageLoaders[a].src)  
	     
		 document.getElementById(a.replace('pimg','')).style.backgroundImage="url('"+window.imageLoaders[a].src+"')";
    }
  }
  if (document.all)
    window.attachEvent("onload",window.hideImage);
  else
    window.addEventListener('load',window.hideImage,false);
  //兼容ff，ff底下没有readyState参数，在开始事件中设置document.readyState来模拟ie的效果
  if (!document.all)
    window.addEventListener('load',function(){document.readyState='complete'},false)
  //自定义的图片加载方法
  window.imageComplete=function(i){
    var obj=window.imageLoaders[i];
    clearInterval(obj.timer);
    var mw=obj.maxWidth;
    var mh=obj.maxHeight;
    var id=obj.uid;
    var img=document.getElementById(id);
    if (!img){
      img=document.createElement("img");
          img.style.display='';
      
    img.setAttribute('id',"pimg"+id);
      document.body.appendChild(img);
    }
    if (obj.width>obj.height)
      if (mw>0)
        if (obj.width>mw)
          img.width=mw;
    else
      if (mh>0)
        if (obj.height>mh)
          img.height=mh;
    img.src=obj.src;
    img.alt=obj.alt;
    img.style.display='none';
    window.imageLoaders[i]=null;
  }
  //加载图片方法，如果id不提供，或者为false，将直接插入一个img
  this.loadImage=function(url,alt,maxWidth,maxHeight,id){
    var imgObj=new Image();
    imgObj.src=url;
    imgObj.uid="pimg"+id;
    imgObj.alt=alt;
    imgObj.maxWidth=maxWidth;
    imgObj.maxHeight=maxHeight;
    if (!id){
      imgObj.uid='img_sheneyan_'+Math.random()*100;
/*hutia的写法：
      document.write(String.fromCharCode(60)+"img src='' id='"+imgObj.uid+"'/"+String.fromCharCode(62))*/
/*mirycat的写法：前后加CDATA*/
    //  document.write("<img src='' id='"+imgObj.uid+"'/>")
    }
    window.imageLoaders[imgObj.uid]=imgObj;
    imgObj.onload=function(){
      window.imageLoaders[this.uid].timer=setInterval("if (document.readyState=='complete'){window.imageComplete('"+this.uid+"');}",500);
	  window.status='加载'+url+'成功';
    }
    imgObj.onerror=function(){window.status='加载'+url+'失败';}
  }
  
}
/*
var ii=new ImageLoader();

<?=$images_loading?>
*/
</script>
<? include $this->gettpl('footer');?>